package com.caifu.mapper;

import com.caifu.pojo.YlPaymentDetailRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

/**
 * <p>
 * 缴费详细记录表 Mapper 接口
 * </p>
 *
 * @author szt
 * @since 2020-11-30
 */
public interface YlPaymentDetailRecordMapper extends BaseMapper<YlPaymentDetailRecord> {

    //通过月份账单id获取实缴月份费用
    @Select("select IFNULL(sum(y.PAY_AMT), 0) from yl_payment_detail_record y where y.MONTH_BILL_ID=#{monthBillId} and y.status='1'")
    double getmonthPayAmt(@Param("monthBillId") int monthBillId);
}
